#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;

struct listnode
{
	listnode()
	{
		cout << "listnode()" << endl;

	}
	~listnode()
	{
		cout << "~listnode()" << endl;
	}
};

template<class T>
class smate_ptr
{
public:
	smate_ptr(T* s)
		:_ptr(s)
	{
		cout << "smate_ptr(T* s)" << endl;

	}

	//~smate_ptr()
	//{
	//	delete _ptr;
	//	cout << "delete _ptr" << endl;
	//}
private:
	listnode* _ptr;
};


int main()
{
	smate_ptr<listnode> si(new listnode);
	return 0;
}